import {add_user_info,logout} from "../../constant/baseConstant";

export const createAddUserInfoAction = (data)=>{
    localStorage.setItem('token',data.token)
    localStorage.setItem('username',data.username)
    return {type:add_user_info,data}
}

export const createLogoutAction = ()=>{
    //登出时候删除浏览器中的数据
    localStorage.removeItem('username')
    localStorage.removeItem('token')
    return {type:logout,data:{}}
}